package es.uji.viselab.benchmark.process;

import com.panayotis.gnuplot.JavaPlot;

import es.uji.viselab.util.LogLevel;
import es.uji.viselab.util.LogRecorder;
import es.uji.viselab.benchmark.database.BMDataType;

public class GNUPlot extends BenchMarkingProcessor{

	public void run(){
		
		if (dbConnection!=null){
		dbConnection.Connect();
		double [][] data = dbConnection.getData(BMDataType.XYZ_END_EFFECTOR);
		
		JavaPlot p = new JavaPlot(true);
		    p.addPlot(data);
	        p.plot();
		} else 
			LogRecorder.log(LogLevel.ERROR, "Cannot process without data (without having a database");
	}

	@Override
	public String getPanelTitle() {
		return "GNU Plot";
	}

	@Override
	public int panelWidth() {
		return 400;
	}

	@Override
	public int panelHeight() {
		return 200;
	}

	
}
